import java.util.ArrayList;


public class Store {

	private ArrayList<Pet> pet1 =new ArrayList();
	public void addPet(Pet pet){
	pet1.add(pet);
	}
	public boolean removePet(Pet pet){
		return pet1.remove(pet);
	}
	public Pet getPet(int i){
		return pet1.get(i);
	}
	public static void main(String[] args) {
		
		

		Store store1 = new Store();
		Cat cat1 = new Cat(30,"cat", true);
		cat1.meow();
		cat1.purr();
		System.out.println(cat1.getname()); // printing output
		Dog dog1 = new Dog(15,"dog",true);
		dog1.bark();
		dog1.run();
		System.out.println(dog1.getname());// printing output
		cat1.die();
		dog1.die();
		
		store1.addPet(cat1); // add pet to the store
		store1.addPet(dog1); // add pet to the store
		System.out.println(store1.getPet(0).getname()); // get pet name
		Cat cat2 = (Cat) store1.getPet(0); // recasting to make sure this is a cat
		cat2.meow();
		System.out.println(store1.getPet(1).getname()); 
		Dog dog2 = (Dog) store1.getPet(1);// recasting to make sure this is a dog
		dog2.bark();
		
		
		
		
		
	}

}
